1. Field of the Invention
Methods and apparatuses consistent with the present invention generally relate to video coding and decoding, and more particularly, to estimating a motion vector using a plurality of motion vector predictors.
2. Description of the Related Art
Inter-frame and intra-frame predictions are widely used video encoding techniques. Intra-frame prediction uses a high correlation between gray levels of adjacent pixels in a single frame. Inter-frame prediction uses similarities between consecutive frames in a video sequence. As long as a sharp change does not occur in a moving picture, many parts of the moving picture change little between consecutive frames. In particular, motion-vector estimation is one of a variety of video encoding techniques used in inter-frame prediction. Motion-vector estimation is designed to process an image by differentially encoding motion vectors obtained by motion estimation. Generally, a motion vector of a block has a close correlation with a motion vector of a neighboring partition. For this reason, the amount of bits to be encoded can be reduced by predicting a motion vector of a current block from the motion vector of a neighboring partition and encoding only a differential vector between these two motion vectors.
FIGS. 1A and 1B illustrate neighboring partitions used for related art motion estimation.
Referring to FIG. 1A, a current macroblock E and its neighboring partitions A, B, and C are the same in shape, and predictive encoding of a motion vector uses the median value of horizontal components and vertical components of motion vectors of a block A located to the left of the current macroblock E, a block B located above the current block E, and a block C located above and to the right of the current block E.
In FIG. 1B, the current macroblock E and its neighboring partitions A, B, and C are different in shape, and the motion vector of the current macroblock E is estimated as follows.
(1) If a neighboring partition located to the left of the current macroblock E is divided into several blocks, a block A located uppermost among those blocks is used for motion estimation. If a neighboring partition located above the current macroblock E is divided into several blocks, a block B located leftmost among those blocks is used for motion estimation. The median value of horizontal components and vertical components of motion vectors of the block A, the block B, and a block C located above and to the right of the current macroblock E is used for predictive encoding of the motion vector of the current macroblock E.
(2) However, if the current macroblock E to be encoded is not a regular square in shape, i.e., the current macroblock E is composed of 16×8 or 8×16 pixels, the motion vector of the current macroblock E is estimated based on the size of a motion compensation block without using the median value, as follows.
(i) If the current macroblock E is composed of 16×8 pixels, the block B located above the current block E and the block A located to the left of the current macroblock E are used for motion estimation.
(ii) If the current macroblock E is composed of 8×16 pixels, the block A located to the left of the current macroblock E and the block C located above and to the right of the current block E are used for motion estimation.
(3) In a skip macroblock mode, estimation is performed as described in (1).
As described above, at least one neighboring block may be used for estimation of a motion vector of the current block. However, according to the prior art, only typical neighboring blocks are available and, out of those neighboring blocks, a block that is similar to the current block, i.e., the block having the same motion as the current block, is useful, but the other blocks are not. Therefore, there is a need to use a plurality of other neighboring blocks for accurate estimation as well as those typical neighboring blocks. In this case, processing of information about neighboring blocks used for motion estimation is also required.